package com.cn.modules.login;

import com.jfinal.core.Controller;
import com.jfinal.validate.Validator;

public class LoginValidator extends Validator {

	@Override
	protected void validate(Controller c) {
		validateRequiredString("loginName", "loginNameMsg", "请输入账号!");
		validateRequiredString("passWord", "passWordMsg", "请输入密码!");
	}

	@Override
	protected void handleError(Controller c) {
		
		c.keepPara("loginName");
		c.redirect("/view/login/login.jsp");
	}

}
